#include "logger.h"


USE_JLIB_NS



void logger::print_vec1s (f32 value, const std::string &name) noexcept {
  printf("{%s: %f}\n", name.c_str(), value);
}

void logger::print_vec1d (f64 value, const std::string &name) noexcept {
  printf("{%s: %lf}\n", name.c_str(), value);
}

void logger::print_vec1i (s32 value, const std::string &name) noexcept {
  printf("{%s: %d}\n", name.c_str(), value);
}



void logger::print_vec2s (const Vec2 &value, const std::string &name) noexcept {
  printf("[%s: %f, %f]\n", name.c_str(), value.x, value.y);
}

void logger::print_vec2d (const Vec2d &value, const std::string &name) noexcept {
  printf("[%s: %lf, %lf\n]", name.c_str(), value.x, value.y);
}

void logger::print_vec2i (const Vec2i &value, const std::string &name) noexcept {
  printf("[%s: %d, %d]\n", name.c_str(), value.x, value.y);
}



void logger::print_vec3s (const Vec3 &value, const std::string &name) noexcept {
  printf("[%s: %f, %f, %f]\n", name.c_str(), value.x, value.y, value.z);
}

void logger::print_vec3d (const Vec3d &value, const std::string &name) noexcept {
  printf("[%s: %lf, %lf, %lf]\n", name.c_str(), value.x, value.y, value.z);
}

void logger::print_vec3i (const Vec3i &value, const std::string &name) noexcept {
  printf("[%s: %d, %d, %d]\n", name.c_str(), value.x, value.y, value.z);
}



void logger::print_vec4s (const Vec4 &value, const std::string &name) noexcept {
  printf("[%s: %f, %f, %f, %f]\n", name.c_str(), value.x, value.y, value.z, value.w);
}

void logger::print_vec4d (const Vec4d &value, const std::string &name) noexcept {
  printf("[%s: %lf, %lf, %lf, %lf]\n", name.c_str(), value.x, value.y, value.z, value.w);
}



void logger::print_box2s (const Box2 &value, const std::string &name) noexcept {
  printf("[%s: (%f, %f), (%f, %f)]\n", name.c_str(), value.x, value.y, value.X, value.Y);
}

void logger::print_box2d (const Box2d &value, const std::string &name) noexcept {
  printf("[%s: (%lf, %lf), (%lf, %lf)]\n", name.c_str(), value.x, value.y, value.X, value.Y);
}



void logger::print_box3s (const Box3 &value, const std::string &name) noexcept {
  printf("[%s: (%f, %f, %f), (%f, %f, %f)]\n", name.c_str(), value.x, value.y, value.z, value.X, value.Y, value.Z);
}

void logger::print_box3d (const Box3d &value, const std::string &name) noexcept {
  printf("[%s: (%lf, %lf, %lf), (%lf, %lf, %lf)]\n", name.c_str(), value.x, value.y, value.z, value.X, value.Y, value.Z);
}



void logger::print_mat4s (const Mat4 &value, const std::string &name) noexcept {
  printf("[%s:\n\t%f, %f, %f, %f\n\t%f, %f, %f, %f\n\t%f, %f, %f, %f\n\t%f, %f, %f, %f\n]\n", name.c_str(),
         value.v0[0], value.v1[0], value.v2[0], value.v3[0],
         value.v0[1], value.v1[1], value.v2[1], value.v3[1],
         value.v0[2], value.v1[2], value.v2[2], value.v3[2],
         value.v0[3], value.v1[3], value.v2[3], value.v3[3]);
}

void logger::print_mat4d (const Mat4d &value, const std::string &name) noexcept {
  printf("[%s:\n\t%lf, %lf, %lf, %lf\n\t%lf, %lf, %lf, %lf\n\t%lf, %lf, %lf, %lf\n\t%lf, %lf, %lf, %lf\n]\n", name.c_str(),
         value.v0[0], value.v1[0], value.v2[0], value.v3[0],
         value.v0[1], value.v1[1], value.v2[1], value.v3[1],
         value.v0[2], value.v1[2], value.v2[2], value.v3[2],
         value.v0[3], value.v1[3], value.v2[3], value.v3[3]);
}

